﻿@{
    ViewBag.Title = "UserProfile";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}

@using MVCTrainningSample.Models;
@model User

<div class="row"  style="padding-top:150px;">
    <div class="col-lg-12" id="divUserProfile">
        <div class="form-horizontal">
            <h4>User Profile</h4>
            <hr />
            <div class="panel-body">
                <div class="col-lg-12">
                    <div class="form-group">
                        <label class="col-sm-2">UserName</label>
                        <div class="col-sm-9">
                            @Html.DisplayFor(model => model.Username, new { @class = "form-control" })
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2">Firstr Name</label>
                        <div class="col-sm-9">
                            @Html.DisplayFor(model => model.FirstName, new { @class = "form-control" })
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2">Last Name</label>
                        <div class="col-sm-9">
                            @Html.DisplayFor(model => model.LastName, new { @class = "form-control" })
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2">Email</label>
                        <div class="col-sm-9">
                            @Html.DisplayFor(model => model.Email, new { @class = "form-control" })
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2">User Role</label>
                        <div class="col-sm-9">
                            @Html.DisplayFor(model => model.Roles.FirstOrDefault().RoleName, new { @class = "form-control" })
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2">Create Date</label>
                        <div class="col-sm-9">
                            @{
                                string createdDate = null;
                                if (Model.CreateDate != null)
                                { 
                                    createdDate = String.Format("{0:d}", Model.CreateDate);
                                }
                            }
                            @Html.DisplayFor(model => createdDate, new { @class = "form-control" })
                        </div>
                    </div>
                </div>
            </div>
                   
        </div>
    </div>
</div>
